Recording Database Access Statistics
Firewall can collect and report statistics on SQL-based database access requests in specified jobs. The statistics collected when the DB#MON job is active and are placed in *DBSTT (database statistics) files when each analyzed job ends.
To select database statistics to record in a *DBSTT (database statistics) file, select 3. DB Statistics Settings from the Activation and Server Settings screen (STRFW > 1).
The Work with DB Statistics - Information to Log screen appears:
Work with DB Statistics - Information to Log Page 1/2 Type choices, press Enter. Minimum Affected Operation Rows to Log Read (Fetch) . . . . . . . . . . . 1 Number, 0=Do not log Insert . . . . . . . . . . . . . . 1 Number, 0=Do not log Update . . . . . . . . . . . . . . 1 Number, 0=Do not log Delete . . . . . . . . . . . . . . 1 Number, 0=Do not log Results are logged with type *DBSTT (Database Statistics). SQL and OPNQRYF statistics are logged. More... F3=Exit F9=Extended settings |
The log collects information for each of four types of SQL operations, Read (Fetch), Insert, Update, and Delete.
To limit the log to only include operations of each type that affected a minimum number of rows, set the Minimum Affected Rows to Collect field for that information type to the minimum value. For example, if you set the Minimum Affected Rows to Collect field for Insert operations to 100, the log will only include operations that inserted at least one hundred rows.
To skip logging one of the types of operations, set the Minimum Affected Rows to Collect field for that type to 0.
To specify more details of the logging process, press the F9 key.
To skip logging SQL statements that have run for a long time, set the Disregard SQL statement longer than field to the maximum number of hours that the statement may run continuously while database accesses are being logged. For example, if you set the field to 24, statements that run continuously for more than 24 hours will not be logged. To include statements regardless of how long they run, set the field to 0.
Leave the Number of entries to debug field set to 0 unless developers have directed you to set it to a different value.
After entering the values on this screen, press Enter. The Work with DB Statistics - Data to Control screen appears:
Work with DB Statistics - Data to Control Page 2/2 Type choices, press Enter. 1=Select 4=Delete Subset . . . Opt Seq Description 1 /* Recommended: Use filters to save performance. */ 2 FTRFILE((ALEX/DEMOPF *EQ)) 3 FTRFILE((ALEX/TEST1)) 4 FTRFILE((ALEX/IBM1)) 5 FTRFILE((ALEX/IBM2)) 6 FTRFILE((ALEX/IBM4)) 7 FTRFILE((ALEX/IBM3)) 8 FTRFILE((ALEX/IBM5)) 9 FTRFILE((ALEX/SPOOL1)) 10 FTRFILE((ALEX/SPOOL3)) Bottom F3=Exit F6=Add New F10=Inc/Exclude F12=Previous |
The body of the screen lists up to ten tests to be run on the operations to determine if they are to be included in the output. The tests are combined by an implicit AND.
For each test, the line shows its sequence (from 1 to 10) when run, whether it is active, and a Description. If the test has been defined, the Description shows the program code for the test. To see text descriptions for the tests, press the F10 key.
To modify a test, enter 1 in the Opt field for that line. The Modify DB Statistics Definition screen appears, with fields to set the text description for the test and whether it is active. Press Enter to display the Filter DB Statistics (FTRDBSTT) screen, in which you can specify whether the database file, user profile, or job name or number are equal or not equal to specific or generic* values.
To add a test, press the F6 key. The Add DB Statistics Definition screen appears, in which you can enter new information corresponding to that in the Modify DB Statistics Definition screen.
To delete a test, enter 4 in the Opt field for that line. The Delete DB Statistics Definitions screen appears, in which you can confirm the deletion,
Activating and De-Activating DB Statistics
To activate statistics collection, select 56. Activate DB Statistics from the Activation and Server Settings screen (STRFW > 1). The Start DB Statistics Collection (STRDBSTT) screen appears. Press Enter to confirm that statistics collection is to begin. The DB#MON job in the ZFIREWALL subsystem starts.
To de-activate statistics collection, select 57. De-Activate DB Statistics from the Activation and Server Settings screen (STRFW > 1). The End DB Statistics Collection (ENDDBSTT) screen appears. Press Enter to confirm that statistics collection is to stop. The DB#MON job in the ZFIREWALL subsystem ends.